package part4;

/**
 * @author wcj
 * @Date 2021/5/12 14:45
 * @Version 1.0
 */
public class Part42 {

    public static boolean condition() {
        boolean result = Math.random() < 0.9;
        System.out.println("random result:" + result);
        return result;
    }

    public static void main(String[] args) {
        while (condition()) {
            System.out.println("生成的随机数小于0.9");
        }
        System.out.println("生成的随机数大于等于0.9");
    }
}
